package cn.stard.controller;

import cn.stard.domian.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
        /*集群ip*/
    @Value("${server.port}")
    private Long ip;

    @GetMapping("/getUserById/{id}")

    public User getUserById(@PathVariable Long id){

        return User.builder().id(id).username("zs").intro("我是zs"+ip).build();
    }
}
